<?php echo $header; ?><?php echo $column_left; ?><?php echo $column_right; ?>
<div id="content"><?php echo $content_top; ?>
    <div class="breadcrumb">
        <?php foreach ($breadcrumbs as $breadcrumb) { ?>
        <?php echo $breadcrumb['separator']; ?><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a>
        <?php } ?>
    </div>
    <h1><?php echo $heading_title; ?></h1>
    <form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data" id="orderpayment">
        <div class="content">   
            <table>
                <tbody>
                    <tr>
                        <td><h2><?php echo $text_request_balanse; ?></h2></td>
                        <td><h2><?php echo $balance; ?></h2></td>
                    </tr>
                    <tr>
                        <td><?php echo $entry_request_payment; ?></td>

                        <td><span class="required">*</span><input type="text" name="request_payment" value="<?php
                                                                  if($error_min)
                                                                  {
                                                                  $array_match = array();
        preg_match('/(\d*\.*\d*)/i', $balance, $array_match);
        $balance = $array_match[0];
                                                                  if((double)$balance > (double)$request_payment)
                                                                  { 
                                                                  $array_match = array();
        preg_match('/(\d*\.*\d*)/i', $min_balance, $array_match);
        $min_balance = $array_match[0];
                                                                  echo (double)$min_balance; }
                                                                  else { echo '0.00';}
                                                                  }
                                                                  if($error_max){ 
                                                                  $array_match = array();
        preg_match('/(\d*\.*\d*)/i', $balance, $array_match);
        $balance = $array_match[0];
                                                                  echo (double)$balance; 
                                                                  }
                                                                  ?>" /></td>
                        <td><?php echo $title_request_payment; ?></td>
                    </tr>
                    <tr>
                        <td></td>
                        <td></td>
                        <?php if($error_max) { ?> <td class="error"> <?php echo $error_max; ?> </td> <?php } ?> 
                        <?php if($error_min) { ?> <td class="error"> <?php echo $error_min; ?> </td> <?php } ?> 
                        <?php if($error_nil) { ?> <td class="error"> <?php echo $error_nil; ?> </td> <?php } ?> 
                    </tr>
                    <tr>
                        <td><?php echo $text_request_payment_history; ?></h2></td>
                        <td><?php echo $request_payment_history; ?></td>
                    </tr>
                </tbody>
            </table>
        </div>
        <div class="buttons">
            <div class="left"><a href="<?php echo $back; ?>" class="button"><?php echo $button_back; ?></a></div>
            <div class="right"><a onclick="$('#orderpayment').submit();" class="button"><span><?php echo $button_continue; ?></span></a></div>
        </div>
    </form>

    <?php echo $content_bottom; ?></div>
<script type="text/javascript"><!--
    $('input[name=\'orderpayment\']').bind('change', function() {
    $('.orderpayment').hide();
	
    $('#orderpayment-' + this.value).show();
});

$('input[name=\'orderpayment\']:checked').trigger('change');
//--></script> 
<?php echo $footer; ?> 